﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Kinlo.Model
{
    public class CodeFirst : ViewModelBase
    {
        Guid id;
        int? codeIndex;
        string code;
        double? onceBeforWegith;
        double? onceAfterWeight;
        double? twoBeforWegith;
        double? twoAfterWeight;
        double? weightRework;
        DateTime? productDate;
        bool? isValidate;
        string shortResult;
        string shortResult2;
        string shortValue;
        string shortUnit;
        string shortUnitSeq;
        string shortVoltage;
        string shortDuration;
        long snowflake;

        public long Snowflake
        {
            get { return snowflake; }
            set
            {
                snowflake = value;
                RaisePropertyChanged(() => Snowflake);
            }
        }
        public Guid ID
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => ID);
            }
        }
        public int? CodeIndex
        {
            get { return codeIndex; }
            set
            {
                codeIndex = value;
                RaisePropertyChanged(() => CodeIndex);
            }
        }
        /// <summary>
        /// 条码
        /// </summary>
        [PrintExport(Description = "条码 ", Order = 1, Visibility = true)]
        public string Code
        {
            get { return code; }
            set
            {
                code = value;
                RaisePropertyChanged(() => Code);
            }
        }
        /// <summary>
        /// 一次前重
        /// </summary>
        [PrintExport(Description = "一次前重 ", Order = 1, Visibility = true)]
        public double? OnceBeforWeight
        {
            get { return onceBeforWegith; }
            set
            {
                onceBeforWegith = value;
                RaisePropertyChanged(() => OnceBeforWeight);
            }
        }
        /// <summary>
        /// 一次后重
        /// </summary>
        [PrintExport(Description = "一次后重 ", Order = 1, Visibility = true)]
        public double? OnceAfterWeight
        {
            get { return onceAfterWeight; }
            set
            {
                onceAfterWeight = value;
                RaisePropertyChanged(() => OnceAfterWeight);
            }
        }

        /// <summary>
        /// 二次前重
        /// </summary>
        [PrintExport(Description = "二次前重 ", Order = 61, Visibility = true)]
        public double? TwoBeforWeight
        {
            get { return twoBeforWegith; }
            set
            {
                twoBeforWegith = value;
                RaisePropertyChanged(() => TwoBeforWeight);
            }
        }
        /// <summary>
        /// 二次后重
        /// </summary>
        [PrintExport(Description = "二次后重 ", Order = 62, Visibility = true)]
        public double? TwoAfterWeight
        {
            get { return twoAfterWeight; }
            set
            {
                twoAfterWeight = value;
                RaisePropertyChanged(() => TwoAfterWeight);
            }
        }
        /// <summary>
        /// 补液后重量
        /// </summary>
        public double? WeightRework
        {
            get { return weightRework; }
            set
            {
                weightRework = value;
                RaisePropertyChanged(() => WeightRework);
            }
        }
        /// <summary>
        /// 日期
        /// </summary>
        [PrintExport(Description = "日期 ", Order = 1, Visibility = true)]
        public DateTime? ProductDate
        {
            get { return productDate; }
            set
            {
                productDate = value;
                RaisePropertyChanged(() => ProductDate);
            }
        }
        public bool? IsValidate
        {
            get { return isValidate; }
            set
            {
                isValidate = value;
                RaisePropertyChanged(() => IsValidate);
            }
        }
        /// <summary>
        /// 短路测试结果
        /// </summary>
        [PrintExport(Description = "短路测试结果 ", Order = 4, Visibility = true)]
        public string ShortResult
        {
            get { return shortResult; }
            set
            {
                shortResult = value;
                RaisePropertyChanged(() => ShortResult);
            }
        }
        /// <summary>
        /// 结果
        /// </summary>
        [PrintExport(Description = "结果 ", Order = 1, Visibility = true)]
        public string ShortResult2
        {
            get { return shortResult2; }
            set
            {
                shortResult2 = value;
                RaisePropertyChanged(() => ShortResult2);
            }
        }
        /// <summary>
        /// 短路测试值
        /// </summary>
        [PrintExport(Description = "短路测试值 ", Order = 2, Visibility = true)]
        public string ShortValue
        {
            get { return shortValue; }
            set
            {
                shortValue = value;
                RaisePropertyChanged(() => ShortValue);
            }
        }
        /// <summary>
        /// 短路测试单位
        /// </summary>
        [PrintExport(Description = "短路测试单位", Order = 3, Visibility = true)]
        public string ShortUnit
        {
            get { return shortUnit; }
            set
            {
                shortUnit = value;
                RaisePropertyChanged(() => ShortUnit);
            }
        }

        public string ShortUnitSeq
        {
            get { return shortUnitSeq; }
            set
            {
                shortUnitSeq = value;
                RaisePropertyChanged(() => ShortUnitSeq);
            }
        }
        public string ShortVoltage
        {
            get { return shortVoltage; }
            set
            {
                shortVoltage = value;
                RaisePropertyChanged(() => ShortVoltage);
            }
        }
        public string ShortDuration
        {
            get { return shortDuration; }
            set
            {
                shortDuration = value;
                RaisePropertyChanged(() => ShortDuration);
            }
        }

        #region 新增

        private UInt64? vp;
        /// <summary>
        /// VP设定值
        /// </summary>
        [PrintExport(Description = "VP设定值", Order = 30, Visibility = true)]
        public UInt64? VP
        {
            get { return vp; }
            set { vp = value; RaisePropertyChanged(() => VP); }
        }
        private UInt64? tk;
        /// <summary>
        /// TK设定值
        /// </summary>
        [PrintExport(Description = "TK设定值", Order = 31, Visibility = true)]
        public UInt64? TK
        {
            get { return tk; }
            set { tk = value; RaisePropertyChanged(() => TK); }
        }

        private UInt64? tf;
        /// <summary>
        /// TF设定值
        /// </summary>
        [PrintExport(Description = "TF设定值", Order = 32, Visibility = true)]
        public UInt64? TF
        {
            get { return tf; }
            set { tf = value; RaisePropertyChanged(() => TF); }
        }
        private double? vd1;
        /// <summary>
        /// VD1设定值
        /// </summary>
        [PrintExport(Description = "VD1设定值", Order = 33, Visibility = true)]
        public double? VD1
        {
            get { return vd1; }
            set { vd1 = value; RaisePropertyChanged(() => VD1); }
        }
        private double? vd2;
        /// <summary>
        /// VD2设定值
        /// </summary>
        [PrintExport(Description = "VD2设定值", Order = 34, Visibility = true)]
        public double? VD2
        {
            get { return vd2; }
            set { vd2 = value; RaisePropertyChanged(() => VD2); }
        }
        private double? vd3;
        /// <summary>
        /// VD3设定值
        /// </summary>
        [PrintExport(Description = "VD3设定值", Order = 35, Visibility = true)]
        public double? VD3
        {
            get { return vd3; }
            set { vd3 = value; RaisePropertyChanged(() => VD3); }
        }
        private UInt64? r;
        /// <summary>
        /// R设定值
        /// </summary>
        [PrintExport(Description = "R设定值", Order = 36, Visibility = true)]
        public UInt64? R
        {
            get { return r; }
            set { r = value; RaisePropertyChanged(() => R); }
        }
        private UInt64? rt;
        /// <summary>
        /// RT设定值
        /// </summary>
        [PrintExport(Description = "RT设定值", Order = 37, Visibility = true)]
        public UInt64? RT
        {
            get { return rt; }
            set { rt = value; RaisePropertyChanged(() => RT); }
        }
        private int? voltage;
        /// <summary>
        /// VP实测值
        /// </summary>
        [PrintExport(Description = "VP实测值", Order = 38, Visibility = true)]
        public int? Voltage
        {
            get { return voltage; }
            set { voltage = value; RaisePropertyChanged(() => Voltage); }
        }
        private int? upperTime;
        /// <summary>
        /// TP实测值
        /// </summary>
        [PrintExport(Description = "TP实测值", Order = 39, Visibility = true)]
        public int? UpperTime
        {
            get { return upperTime; }
            set { upperTime = value; RaisePropertyChanged(() => UpperTime); }
        }


        private int? drop1;
        /// <summary>
        /// VD1实测值
        /// </summary>
        [PrintExport(Description = "VD1实测值", Order = 40, Visibility = true)]
        public int? Drop1
        {
            get { return drop1; }
            set { drop1 = value; RaisePropertyChanged(() => Drop1); }
        }

        private int? drop2;
        /// <summary>
        /// VD2实测值
        /// </summary>
        [PrintExport(Description = "VD2实测值", Order = 41, Visibility = true)]
        public int? Drop2
        {
            get { return drop2; }
            set { drop2 = value; RaisePropertyChanged(() => Drop2); }
        }

        private int? drop3;
        /// <summary>
        /// VD3实测值
        /// </summary>
        [PrintExport(Description = "VD3实测值", Order = 42, Visibility = true)]
        public int? Drop3
        {
            get { return drop3; }
            set { drop3 = value; RaisePropertyChanged(() => Drop3); }
        }
        private float? resistance;
        /// <summary>
        /// 短路值
        /// </summary>
        [PrintExport(Description = "R实测值", Order = 43, Visibility = true)]
        public float? Resistance
        {
            get { return resistance; }
            set { resistance = value; RaisePropertyChanged(() => Resistance); }
        }
        private bool? result;
        /// <summary>
        /// 总结果
        /// </summary>
        [PrintExport(Description = "总结果", Order = 44, Visibility = true)]
        public bool? Result
        {
            get { return result; }
            set { result = value; RaisePropertyChanged(() => Result); }
        }
        private bool? drop1Result;
        /// <summary>
        /// VD1结果
        /// </summary>
        [PrintExport(Description = "VD1结果", Order = 45, Visibility = true)]
        public bool? Drop1Result
        {
            get { return drop1Result; }
            set { drop1Result = value; RaisePropertyChanged(() => Drop1Result); }
        }

        private bool? drop2Result;
        /// <summary>
        /// VD2结果
        /// </summary>
        [PrintExport(Description = "VD2结果", Order = 46, Visibility = true)]
        public bool? Drop2Result
        {
            get { return drop2Result; }
            set { drop2Result = value; RaisePropertyChanged(() => Drop2Result); }
        }
        private bool? drop3Result;
        /// <summary>
        /// VD3结果
        /// </summary>
        [PrintExport(Description = "VD3结果", Order = 47, Visibility = true)]
        public bool? Drop3Result
        {
            get { return drop3Result; }
            set { drop3Result = value; RaisePropertyChanged(() => Drop3Result); }
        }

        private bool? vp_Result;
        /// <summary>
        /// VP结果(实际测量到的电压结果)
        /// </summary>
        [PrintExport(Description = "VP结果", Order = 48, Visibility = true)]
        public bool? VPResult
        {
            get { return vp_Result; }
            set { vp_Result = value; RaisePropertyChanged(() => VPResult); }
        }
        private bool? openResult;
        /// <summary>
        /// 开路结果
        /// </summary>
        [PrintExport(Description = "开路结果", Order = 48, Visibility = true)]
        public bool? OpenResult
        {
            get { return openResult; }
            set { openResult = value; RaisePropertyChanged(() => OpenResult); }
        }

        private bool? voltageResult1;
        /// <summary>
        /// 放电1结果
        /// </summary>
        [PrintExport(Description = "放电1结果", Order = 49, Visibility = true)]
        public bool? VoltageResult1
        {
            get { return voltageResult1; }
            set { voltageResult1 = value; RaisePropertyChanged(() => VoltageResult1); }
        }

        private bool? voltageResult2;
        /// <summary>
        /// 放电2结果
        /// </summary>
        [PrintExport(Description = "放电2结果", Order = 50, Visibility = true)]
        public bool? VoltageResult2
        {
            get { return voltageResult2; }
            set { voltageResult2 = value; RaisePropertyChanged(() => VoltageResult2); }
        }


        private bool? tl_Result;
        /// <summary>
        /// TL结果(电压上升时间下限值结果)
        /// </summary>
        [PrintExport(Description = "TL结果", Order = 51, Visibility = false)]
        public bool? TL_Result
        {
            get { return tl_Result; }
            set { tl_Result = value; RaisePropertyChanged(() => TL_Result); }
        }

        private bool? th_Result;
        /// <summary>
        /// TH结果(电压上升时间上限值结果)
        /// </summary>
        [PrintExport(Description = "TH结果", Order = 52, Visibility = false)]
        public bool? TH_Result
        {
            get { return th_Result; }
            set { th_Result = value; RaisePropertyChanged(() => TH_Result); }
        }

        private bool? resistanceResult;
        /// <summary>
        /// 短路测试结果
        /// </summary>
        [PrintExport(Description = "短路测试结果", Order = 53, Visibility = true)]
        public bool? ResistanceResult
        {
            get { return resistanceResult; }
            set { resistanceResult = value; RaisePropertyChanged(() => ResistanceResult); }
        }
        private bool? residueVoltageResult;
        /// <summary>
        /// 剩余电压结果
        /// </summary>
        [PrintExport(Description = "剩余电压结果", Order = 54, Visibility = true)]
        public bool? ResidueVoltageResult
        {
            get { return residueVoltageResult; }
            set { residueVoltageResult = value; RaisePropertyChanged(() => ResidueVoltageResult); }
        }


        private int? residueVoltage;
        /// <summary>
        /// 剩余电压
        /// </summary>
        [PrintExport(Description = "剩余电压", Order = 24, Visibility = true)]
        public int? ResidueVoltage
        {
            get { return residueVoltage; }
            set { residueVoltage = value; RaisePropertyChanged(() => ResidueVoltage); }
        }


        #endregion

    }
}
